<template>
	<mescroll-body ref="mescrollRef" @init="mescrollInit" @up="upCallback"  @down="downCallback">
		<view class="container">
			<view class="recharge-order">
				<!-- <scroll-view @scrolltolower="bindDownLoad" scroll-y :style="{ height: scrollHeight + 'px' }"> -->
				<view v-for="(item, index) in list.data" :key="index" class="order-item dis-flex flex-x-between flex-y-center">
					<view class="item-left">
						<view class="rec-status"><text>充值成功</text></view>
						<view class="rec-time">
							<text>{{ item.pay_time.text }}</text>
						</view>
					</view>
					<view class="item-right">
						<text>+{{ item.actual_money }}元</text>
					</view>
				</view>
				<!-- 没有记录 -->
				<!-- 	<view class="yoshop-notcont" v-if="!list.data.length && !isLoading">
					<text class="iconfont icon-wushuju"></text>
					<text class="cont">亲，暂无充值记录哦</text>
				</view> -->
				<!-- </scroll-view> -->
			</view>
		</view>
	</mescroll-body>
</template>

<script>
import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins.js';
export default {
	mixins: [MescrollMixin], // 使用mixin
	data() {
		return {
			list: { data: [] } // 充值记录
		};
	},
	onLoad() {
	},
	onShow() {
	},
	methods: {
		/**
		 * 获取充值记录列表
		 */
		upCallback(mescroll) {
			this.$u.api.getRechargeOrder(mescroll.num).then(res=>{
				let resList = res.data.list;
				if(mescroll.num==1){
					this.list = resList;
				}else{
					this.$set(this.list, 'data', dataList.data.concat(resList.data));
				}
				this.mescroll.endBySize(resList.data.length, res.data.total)
				
			}).catch(e=>{
				this.mescroll.endErr()
			})
		}
	}
};
</script>

<style>
page,
.container {
	background: #fff;
}

.recharge-order {
	padding: 0 30rpx;
}

.order-item {
	font-size: 32rpx;
	padding: 10rpx 20rpx;
	line-height: 1.8;
	border-bottom: 1rpx solid rgb(238, 238, 238);
}

.order-item .rec-time {
	color: rgb(160, 160, 160);
	font-size: 26rpx;
}
</style>
